<template>
	<div class="mall_main">
		<component :is="mallHomeAdComponent" v-if="mallHomeAd"></component>
		<component :is="swipeBanner"></component>
		<component :is="mallItem" :mallItemComponent="mallItemComponent" :goods="goods"></component>
	</div>
</template>
<script>
	export default{
		name: "MallHome",
		props:[],
		data: function(){
			return {
				mallHomeAdComponent:r => require.ensure([], () => r(require('../../components/ad/mallhome-ad.vue')), 'HeaderAd'),
				mallItem: r => require.ensure([], () => r(require('../../components/mall/mall-item.vue')), 'MallItem'),
				mallItemComponent: r => require.ensure([], () => r(require('../../components/mall/mall-list.vue')), 'MallList'),
				mallHomeAd: this.$store.state.ad.mallHomeAd,
				goods: this.$store.state.goods,
				swipeBanner: r=>require.ensure([], () => r(require('../../components/mall/custom-swipe-banner.vue')), "SwipeBanner")
			}
		},
		created: function(){
			this.$emit("upLocalData", [{
				name: "type",
				value: "mall"
			},{
				name: "channelName",
				value: this.$route.meta.title
			}]);
		}
	}
</script>
<style lang="less">
	@base:23.44/1rem;
	.mall_main{
		
	}
</style>